package com.oak.broke.config.mybatis.encript.config;

import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @author tanghan
 * @Description 国密sm4加密字段配置
 * @date 2023/04/19/ 17:19:00
 */
@Component
public class Sm4SecretColumnConfig {
    private Map<String, EncryptColumnInfo> encryptColumnInfoMap = new HashMap<>();

    public Sm4SecretColumnConfig() {
        // 国密加密字段
        encryptColumnInfoMap.put("contacts_phone", new EncryptColumnInfo("contacts_phone", String.class));
        encryptColumnInfoMap.put("id_card", new EncryptColumnInfo("id_card", String.class));
        encryptColumnInfoMap.put("card_no", new EncryptColumnInfo("card_no", String.class));

        encryptColumnInfoMap.put("contactsPhone", new EncryptColumnInfo("contactsPhone", String.class));
        encryptColumnInfoMap.put("phone", new EncryptColumnInfo("phone", String.class));
    }

    public Map<String, EncryptColumnInfo> getEncryptColumnInfoMap() {
        return encryptColumnInfoMap;
    }
}
